import request from '@/utils/request'
// 请求合同列表
export function getListApi(params) {
  return request({
    url: '/contract/list',
    params
  })
}
// 添加合同
export function addContractApi(data) {
  return request({
    url: '/contract',
    method: 'POST',
    data
  })
}
// 请求分类数量
export function getTypeCountApi() {
  return request({
    url: '/contract/StausCount'
  })
}
// 修改合同状态
export function changeContractApi(data) {
  return request({
    url: '/contract',
    method: 'PUT',
    data
  })
}
export function ContractApi(id, status) {
  return request({
    url: '/contract',
    method: 'PUT',
    data: {
      id,
      status
    }
  })
}
// 单个合同详情
export function getOneDetailApi(id) {
  return request({
    url: `/contract/detail/${id}`
  })
}
